{%extends 'base.html'%}


{% block body %}

<div class="titil_min" style="margin-top: 10px;">
<span id="timer" ></span>
</div>
<form class="form" method="POST" action="/notify_code" style="margin-top: 10px;">
  <div class="container">
    

    <div class="row">
      <div class="col-sm-3 col-md-3"></div>
      <div class="form-group col-xs-12 col-sm-6 col-md-6">
        <label class="sr-only" for="exampleInputAmount">Amount (in dollars)</label>
        <div class="input-group">
          <div class="input-group-addon">{{phone}}</div>
          <input type="text" class="form-control" id="exampleInputAmount" placeholder="验证码" name="notify_code" required>
          <!-- <div class="input-group-addon">.00</div> -->
        </div>
      </div>
      <div class="col-sm-3 col-md-3"></div>
    </div>


    <!-- <div class="row"> -->
    <div style="text-align: center;margin-top: 30px;">
      <button type="submit" class="btn btn-primary">提交</button>
    </div>
  </div>
</form>





{% endblock %}

{% block script %}
<script>
  document.getElementById("demo").innerHTML = "验证";
  var maxtime = 5*60;
			function djs(){
			if(maxtime>= 0) {
			minutes = Math.floor(maxtime / 60);
			seconds = Math.floor(maxtime % 60);
			msg="验证码剩余有效时间："+minutes+"分"+seconds+"秒";
			document.all["timer"].innerHTML=msg;
			if(maxtime==5*60);
				--maxtime;
			}else{
				clearInterval(timer);
			}
		}
		timer=setInterval("djs()", 1000); 
</script>
{% endblock %}